home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10289 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.magi.com!news!news.magi.com
  2. From: nredding@magi.com (Neil Redding)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Pohl's "C++ for C Programmers"
  5. Date: Wed, 06 Mar 1996 23:03:24 -0500
  6. Organization: Magi Data Consulting
  7. Message-ID: <nredding-0603962303240001@magi06p44.magi.com>
  8. References: <bnelsonDnEH5y.Ax0@netcom.com>
  9. NNTP-Posting-Host: magi06p44.magi.com
  10.  
  11. In article <bnelsonDnEH5y.Ax0@netcom.com>, bnelson@netcom.com (Bob Nelson)
  12. wrote:
  13.  
  14. >As a longtime C programmer now trying to learn C++, I am using Ira
  15. >Pohl's "C++ for C Programmers" as my iniitial guide to the language.
  16. >
  17. >I am currently stalled because of an issue found in the section
  18. >dealing with constructors and destructors, chapter 1.6, (p. 21-22).
  19. >NOTE: You'll need to reference that section to follow th rest of this
  20. >posting.
  21. >
  22. >In particular, Pohl introduces a dynamic storage scheme for the
  23. >storage of an array of characters. Prior to this point, the
  24. >string's characters were stored in a fixed array.
  25. >
  26. >Tied into this is the overloaded '+' operator used to concatenate
  27. >two string-type objects. Naturally, it worked as expected when
  28. >the class used a fixed array for storage. Once the fixed array
  29. >became a dynamic object, the concatentation '+' operator ceased
  30. >to work --
  31.  
  32. I am also learning C++ using Pohl's book. This particular program DOES work
  33. for me .  I am using Codewarrior on a Macintosh.
  34.  
  35. -- 
  36. Neil Redding
  37. Ottawa, Canada
  38.